import request from '@/request';

// 今日直播列表
const getTodayRoom = (data?: any) => {
  return request('v1/today/room', {
    method: 'POST',
    data,
  });
};

// 抖音用户列表
const getUserList = (data?: any) => {
  return request('v1/user/list', {
    method: 'POST',
    data,
  });
};

// 抖音用户详情
const getUserDetail = (data?: any) => {
  return request('v1/user/detail', {
    method: 'GET',
    data,
  });
};

// 房间-base信息
const getRoomInfo = (data?: any) => {
  return request(`v1/room/base/${data.roomId}`);
};

// 房间-flow
const getRoomFlow = (data?: any) => {
  return request(`v1/room/flow/${data.roomId}`);
};

// 房间商品列表
const getRoomProduct = (data?: any) => {
  return request(`v1/room/product/${data.roomId}`);
};

// 折线图
const getRoomChart = (data?: any) => {
  return request(`v1/room/chart/${data.roomId}`);
};

// 直播间最新5条信息
const getHistoryRoom = (data?:any) => {
  return request('v1/user/history/room', {
    method: 'GET',
    data,
  });
};

export {
  getTodayRoom,
  getUserList,
  getUserDetail,
  getRoomInfo,
  getRoomFlow,
  getRoomProduct,
  getRoomChart,
  getHistoryRoom,
};
